﻿import { CommonModule } from '@angular/common';
import { NgModule, ModuleWithProviders } from '@angular/core';
import { AbpModule } from '@abp/abp.module';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';

import { AppSessionService } from './session/app-session.service';
import { AppUrlService } from './nav/app-url.service';
import { AppAuthService } from './auth/app-auth.service';
import { AppRouteGuard } from './auth/auth-route-guard';

import { TopBarComponent } from './layout/topbar.component';
import { NavmenuComponent } from './layout/navmenu/navmenu.component';
@NgModule({
  imports: [
    CommonModule,
    AbpModule,
    RouterModule,
    FormsModule
  ],
  declarations: [
    TopBarComponent,
    NavmenuComponent
  ],
  exports: [
    TopBarComponent,
    NavmenuComponent
  ]
})
export class SharedModule {
  static forRoot(): ModuleWithProviders {
    return {
      ngModule: SharedModule,
      providers: [
        AppSessionService,
        AppUrlService,
        AppAuthService,
        AppRouteGuard
      ]
    }
  }
}
